<?php /* Smarty version 2.6.18, created on 2016-12-12 15:56:24
         compiled from notice/m.common.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "m.index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!--头部 end-->
<!--主体部分-->

<div class="container" style="margin-top:70px;">
	<div class="row" style="margin-top:10px;margin-bottom:20px;">
		<div class="col-sm-12 distance" >
			<div class="form-group">
				<div class="col-sm-10  text-center">
					<div class="col-xs-6"><a href="index.php?a=notice.commonlist" class="btn btn-primary">&nbsp;&nbsp;&nbsp;&nbsp;通&nbsp;知&nbsp;&nbsp;&nbsp;&nbsp;</a> </div>
					<div class="col-xs-6">
						
						<?php if ($this->_tpl_vars['appoint_lists'] == 1): ?><?php else: ?>
						<a href="index.php?a=notice.commonissuelist" class="btn btn-default">发布通知</a>
						<?php endif; ?></div>
				</div>
			</div>
		</div>
	</div>

	<!--<div class="row" style="margin-right:10%;">
      <div  class="col-xs-sm  text-right" > <a class="btn btn-primary" href="superior_notice_add.html" style="width:30%">增加</a></div>
    </div>-->
	<div class="row" style="margin-top:10px;">
		<form method="get" action="">
			<div class="col-sm-12 distance hierarchy2">
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">标题:</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="notice_title" value="<?php echo $this->_tpl_vars['notice_title']; ?>
">
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance hierarchy" >
				<div class="form-group hierarchy" >
					<label for="" class="col-sm-2 control-label">发布部门:</label>
					<div class="col-sm-10">
						<select class="form-control" name="department_id" style="padding:0;">
							<option value="">全部</option>
							<?php $_from = $this->_tpl_vars['department_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
							<option value="<?php echo $this->_tpl_vars['value']['department_id']; ?>
"<?php if ($this->_tpl_vars['value']['department_id'] == $this->_tpl_vars['department_id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']['department_name']; ?>
</option>

							<?php endforeach; endif; unset($_from); ?>
						</select>
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance hierarchy2">
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">发布时间:</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" value="<?php echo $this->_tpl_vars['from']; ?>
" id="start_time" name="from">

					</div>
				</div>
			</div>
			<div class="col-sm-12 distance hierarchy2">
				<div class="form-group">
					<label for="" class="col-sm-2 control-label">结束时间:</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" value="<?php echo $this->_tpl_vars['to']; ?>
" id="end_time" name="to">

					</div>
				</div>
			</div>
			<div class="col-xs-12 distance" >
				<div class="form-group  text-center" style="padding-top:0px;">
					<input type="hidden" name="a" value="notice.commonlist">
					<button type="submit" class="btn btn-success absolutely ">
						搜索
						<tton>
				</div>
			</div>
		</form>
	</div>
	<div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
		<?php $_from = $this->_tpl_vars['notice_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
		<table class="table table-striped table-bordered text-center"  id="middles">
			<tr>
				<td>标题</td>
				<td><a href="index.php?a=notice.commondetails&notice_id=<?php echo $this->_tpl_vars['value']['notice_id']; ?>
"><?php echo $this->_tpl_vars['value']['notice_title']; ?>
</a></td>

			</tr>
			<tr>
				<td>发布部门</td>
				<td><?php echo $this->_tpl_vars['value']['department_name']; ?>
</td>
			</tr>
			<tr>
				<td>发布时间</td>
				<td><?php echo $this->_tpl_vars['value']['start_time']; ?>
</td>
			</tr>

			<td>操作</td>
			<td>
				<a class="btn btn-success btn-sm" href="index.php?a=notice.commondetails&notice_id=<?php echo $this->_tpl_vars['value']['notice_id']; ?>
" title="查 看"><i class="fa fa-search"></i>查 看</a>

				</span>
			</td>
				</tr>
		</table>
		<?php endforeach; endif; unset($_from); ?>
	</div>
</div>
<!--container  end-->

<!--主体部分  end-->
<!--底部-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "m.index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!--container  end-->

<!--底部end-->
<script src="mstatic/js/jquery.min.js" type="text/javascript"></script>
<script src="mstatic/js/bootstrap.min.js"  type="text/javascript"></script>
<script src="mstatic/js/jquery-ui.js"  type="text/javascript"></script><!--日历-->
<script type="text/javascript" src="mstatic/js/jquery.ztree.core-3.5.js"></script><!--树状图-->
<script type="text/javascript" src="mstatic/js/jquery.ztree.excheck-3.5.js"></script><!--树状图-->

<!--日历-->
<script>
	$(function() {
		$( "#start_time" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			changeYear: true,
			numberOfMonths:1,
			onClose: function( selectedDate ) {
				$( "#end_time" ).datepicker( "option", "minDate", selectedDate );
			}
		});
		$( "#end_time" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			changeYear: true,
			numberOfMonths:1,
			onClose: function( selectedDate ) {
				$( "#start_time" ).datepicker( "option", "maxDate", selectedDate );
			}
		});
	});
</script>
<script type="text/javascript">
	var setting = {
		check: {
			enable: true,
		},
		data: {
			simpleData: {
				enable: true
			}
		}
	};
	var zNodes =[
		{ id:1, pId:0, name:"初一级"},
		{ id:11, pId:1, name:"初一1班",},
		{ id:11, pId:1, name:"初一2班",},
		{ id:11, pId:1, name:"初一3班",},
		{ id:2, pId:0, name:"初二级"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:3, pId:0, name:"初三级"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
	];
	var code;

	function setCheck1() {
		var zTree = $.fn.zTree.getZTreeObj("tree2"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
		zTree.setting.check.chkboxType = type;
		showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
	}
	function showCode(str) {
		if (!code) code = $("#code");
		code.empty();
		code.append("<li>"+str+"</li>");
	}
	$(document).ready(function(){
		$.fn.zTree.init($("#tree2"), setting, zNodes);
		setCheck1();
		$("#py").bind("change", setCheck1);
		$("#sy").bind("change", setCheck1);
		$("#pn").bind("change", setCheck1);
		$("#sn").bind("change", setCheck1);
	});

	function c()
	{
		var delidID = "";
		var zTree = $.fn.zTree.getZTreeObj("treeDemo").getCheckedNodes(true);//获取所有选中状态的节点
		for (var i = 0; i < zTree.length; i++) {
			//delidID += zTree[i].id + ",";
			$("#hiddenBox").append('<input type="hidden" name="pid[]" value="'+zTree[i].id+'">');
		}
		var zTree = $.fn.zTree.getZTreeObj("tree2").getCheckedNodes(true);//获取所有选中状态的节点
		for (var i = 0; i < zTree.length; i++) {
			//delidID += zTree[i].id + ",";
			$("#hiddenBox").append('<input type="hidden" name="pid[]" value="'+zTree[i].id+'">');
		}
	}
</script>
<script type="text/javascript">
	var setting = {
		check: {
			enable: true,
		},
		data: {
			simpleData: {
				enable: true
			}
		}
	};
	var zNodes =[
		{ id:1, pId:0, name:"初一级"},
		{ id:11, pId:1, name:"初一1班",},
		{ id:11, pId:1, name:"初一2班",},
		{ id:11, pId:1, name:"初一3班",},
		{ id:2, pId:0, name:"初二级"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:21, pId:2, name:"初二2班"},
		{ id:3, pId:0, name:"初三级"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
		{ id:31, pId:3, name:"初三2班"},
	];
	var code;

	function setCheck() {
		var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
		zTree.setting.check.chkboxType = type;
		showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
	}
	function showCode(str) {
		if (!code) code = $("#code");
		code.empty();
		code.append("<li>"+str+"</li>");
	}
	$(document).ready(function(){
		$.fn.zTree.init($("#treeDemo"), setting, zNodes);
		setCheck();
		$("#py").bind("change", setCheck);
		$("#sy").bind("change", setCheck);
		$("#pn").bind("change", setCheck);
		$("#sn").bind("change", setCheck);
	});
</script>


</body>
</html>